In this video you will learn how to add a simple moving averages and balloons up ends to interactive
bluntly charts.
So both are actually technical indicators used in technical analysis and we are still imparted our Apple
data frame with historical Apple stock prices so adjusted close close.
High low and so on.
And there is actually a special object for creating interactive graphs with technical indicators and
this is off the cuff links.
Quant fake object and we can create the object to this.
Using the cufflinks and then the method quant fake and here but then the parent uses we have to pass
a data frame so for example here our Apple data frame with the stock price data and already here you
can see that the default setting is that we get a candlestick chart and we actually save for the quant
fake object here and the variable QF and let's check the data type of QF.
So that's a cufflinks quant fake object and we not only can use the eye plot method on the pan US data
frame but also on a quant fake object and the let's through this here and in addition we define the
title of our graph to be Apple and also the name.
So let's have a look here.
So here we have the title of our graph and here the name it's apple and you can see actually the candlestick
chart.
So we have here our open high low close the prices for the Apple stock represented in a candlestick
chart.
So this is actually pretty much the same as we did hear above so that's also here.
The candlestick chart for the Apple stock and you might question yourself Now why do we use here the
cufflinks quant fake object when we can also create here the candlestick chart simply with the eye plot
method on the US data frame and the simple answer is that they can't fake object.
Gives us even more flexibility and functionality
so here we have the candlestick chart and now the powerful thing is that we can add additional technical
indicators to our quanta fake object and for example we can call here the method at simply moving ever
US and the v defined to F..
Simple moving average US ON THE LAST The 20 year periods.
So if you check here the available methods and attributes on our quant fake object and we can see that
there are quite a lot so we can add Ballinger pants and the many more technical indicators and also
here simple moving average US support lines trend lines and so on and also the volume.
So let's run here the.
And by doing so we automatically added the simple moving averages with 20 periods to our quant fake
object and if we now again plot our quant fake object with the eye plot method.
So this is exactly the same code as above here.
But meanwhile we edit here the simple moving averages and let's have a look.
And here we have actually the simple moving averages with 20 periods.
And to recall it.
So that's the average stock price over the last 20 days and now we can add even more technical indicators
to our quantified object and we can also add.
Ballinger bans here and again we select the last the 20 period.
So also this is a rolling statistic and we have to define the standard deviation so I will explain this
in a few seconds.
So we at here the polar jump ends and now we a re plot.
The conflict with the I plot method
and here we have actually the Bollinger bands and the balloons events are a technical analysis tool
developed by John Ballinger in the nineteen hundred and 80s and they actually three lines that compose
the ball and Japan's.
So that's the simple moving average which also contains the to the Bollinger bands and then we have
an upper band here and a lower band and the upper and the lower bands are typically two standard deviations
away from the 20 days simple moving average but uh that can be modified so we can modify the window
and we can also choose for example 50 periods and we can also define that.
We want to f for the upper and be lower bands with for example one or three standard deviations away
from the simple moving average and the question is now what is that the intuition behind Bollinger Bands
and the if the distance between the upper band and the lower band is narrow then this is an indication
for low volatility and if the distance between those two is wide then this is an indication for high
volatility and actually some might argue that if the current stock prices at the lower band this is
a sign to buy or to Sarah.
So depending on your philosophy and also if the current prices that the upper band then.
This can be assigned to buy or to sell the stock.
So that was that the video on and active political bands.
And the next video we will learn how to add some more technical indicators here to our interactive plot
graph.
So hope to see you there by.